home *** CD-ROM | disk | FTP | other *** search
/ Project UFO / Project UFO (Disk 4 of 6).adf / IMDISP.DOC < prev    next >
Text File  |  1980-01-09  |  74KB  |  1,571 lines

  1.  
  2.                      PLANETARY DATA SYSTEM
  3.  
  4.           USER'S GUIDE FOR THE PDS IMDISP PROGRAM
  5.  
  6.                          INTRODUCTION
  7.  
  8.      This  document describes the IMDISP program, an  interactive 
  9. image  display utility for the IBM Personal Computer family  (PC, 
  10. XT  and AT) and compatibles. It has been developed for  use  with 
  11. the  Compact  Disk  - Read-Only Memory  (CDROM)  storage  systems 
  12. currently being evaluated by the Planetary Data System (PDS).  It 
  13. can  also  be  used to display images stored on  floppy  or  hard 
  14. disks.
  15.  
  16.      This  User's Guide presents an overview of image  processing 
  17. and  CDROM fundamentals, a section on the installation of  IMDISP 
  18. and CDROM software and hardware, a description of IMDISP  program 
  19. operation,  a description of other utility programs which can  be 
  20. used in conjunction with IMDISP, and a command summary.
  21.  
  22.      Appendices  are provided which describe the contents of  the 
  23. IMDISP distribution disk, the contents and format of the  Voyager 
  24. Uranus   and   Interactive  Data  Interchange  CDROM   disks,   a 
  25. description  of  the  data labeling  standards  and  image  file 
  26. formats  found on these CDROM disks, and references  for  further 
  27. information about image processing and CDROMs.
  28.  
  29.      Other  support  software for using the PDS CDROM  disks  has 
  30. also  been developed. These packages include the  USGS  Planetary 
  31. Image Cartography System (PICS) for Microvax computers, a set  of 
  32. FORTRAN routines to access CDROM disks on VAX computers  (VMSCD), 
  33. and "C" language source code to process disks written in the High 
  34. Sierra  format. Contact Mike Martin (JPLPDS::MMARTIN) for  access 
  35. to these tools.
  36.  
  37.                            Chapter 2
  38.  
  39.                           BACKGROUND
  40.  
  41.  
  42.      Efforts  to utilize small computer systems for  display  and 
  43. analysis  of  scientific data have been hampered by the  lack  of 
  44. sufficient  data  storage  capacity to  accommodate  large  image 
  45. arrays.  Most  planetary images  require  nearly  a  megabyte  of 
  46. storage. Over the past two years a new storage technology "CDROM" 
  47. has been developed which provides the capability to store  up  to 
  48. 600  megabytes of data on a single 4.72-inch disk. The disks  can 
  49. be  mass  produced,  and  hundreds of  copies  of  large  digital 
  50. archives distributed rather than the few sets currently produced. 
  51. Readers for CDROM disks can now be purchased for under a thousand 
  52. dollars   for  use  on  personal  computers  and   some   science 
  53. workstations.
  54.  
  55.      The  PDS  has  worked with  industry  and  other  government 
  56. agencies  to  support the development of CDROM as  a  major  data 
  57. distribution  and storage media for space science  data.  Initial  
  58. development  efforts by the PDS, the Voyager Project, and  multi-
  59. disciplinary   science  representatives  have  resulted  in   the 
  60. production  of 2 CDROM disks, one containing 800  digital  images 
  61. from   the  Voyager  Uranus  encounter,  and  one  containing   a 
  62. collection  of more than 1,400 data files from   all   scientific 
  63. disciplines.  The IMDISP program can be used to display  most  of 
  64. these  data  files on a personal computer equipped with  a  CDROM 
  65. drive.
  66.  
  67. 2.1 DIGITAL IMAGE PROCESSING SUMMARY
  68.  
  69.      A digital image is a picture converted to numerical form  so 
  70. that  it  can  be stored and used in a  computer.  The  image  is 
  71. divided  into a matrix of small regions called picture  elements, 
  72. or pixels. The rows and columns of pixels are called "lines"  and 
  73. "samples", respectively. Each pixel has a numerical value, or  DN 
  74. (data number) value, quantifying the darkness or brightness of    
  75. the image at that spot. In total, each pixel has an address (line 
  76. number,  sample  number) and a DN value, which is all  that  the 
  77. computer needs for processing. The DN value of each pixel usually 
  78. represents  a shade of darkness or brightness between  black  and 
  79. white  (gray levels). How many gray levels there are in an  image 
  80. depends  on  the  number of bits used  to  represent  each  pixel 
  81. intensity  in  the computer. The number of gray  levels  will  be 
  82. equal to 2^n, where n is the number of bits per pixel's DN value. 
  83. If 8 bits are used to represent a pixel's DN value (gray  level), 
  84. the  system will be capable of using 2^8, or 256, gray levels  in 
  85. an image, where DN 0 is pure black, and DN 255 is pure white. If 
  86. each DN used only 4 bits of storage, the image would contain only 
  87. 2^4 or 16 gray levels; if there were only 1 bit per DN, the image 
  88. would contain only black and white pixels (bit values of 0 or 1).
  89.  
  90. 2.2 OVERVIEW OF IMDISP CAPABILITIES
  91.  
  92.      While  the  specifics of IMDISP commands  are  discussed  in 
  93. Chapter 4, this section provides a general overview of how a user 
  94. can manipulate images once a file is selected. There are  DISPLAY 
  95. commands which allow the user to display all or part of an  image 
  96. at  various  positions on the display screen. The user  may  also 
  97. zoom in and out from a point on the image defined by the  cursor, 
  98. and may pan around the image. The cursor may be turned on or off; 
  99. when  on, the arrow keys are used to move the cursor  around  the 
  100. screen; when off, the cursor is not visible.
  101.  
  102.      A  user may choose to "subsample" the image, to enable  more 
  103. or  all  of the original image to be displayed on the  screen  at 
  104. once. For example, if the image were subsampled by a factor of 2, 
  105. every  other  pixel  from every other line  would  be  displayed, 
  106. starting from the upper left corner of the image. If a factor  of 
  107. 3  were chosen, every third pixel from every third line would  be 
  108. displayed. Any positive integer may be used for subsampling.
  109.  
  110.      The user may produce a histogram of an image file, which  is 
  111. a  graph showing the number of pixels per DN value, or per  range 
  112. of  DN values, for the entire image. Histograms are  overlaid  on 
  113. top  of the image, but may be removed using the REFRESH  command. 
  114. Subsampling may be specified when computing a histogram to reduce 
  115. the time required for the calculations.
  116.  
  117.      A  profile may be created which plots DN value versus  pixel 
  118. along a line between two points on the image. After the cursor is 
  119. used to select the two endpoints, the connecting line is drawn on 
  120. the image and the profile is plotted at the bottom of the screen.
  121.  
  122.      The user may also "stretch" the image, which is analogous to 
  123. turning the contrast knob on a TV set. The user specifies low and 
  124. high  DN values; all pixels with values lower than the  specified 
  125. "low"  become  black, and all pixels higher  than  the  specified 
  126. "high"  value become white. All pixels between the low  and  high 
  127. values are evenly shaded between black and white.
  128.  
  129.      There  are bookkeeping types of commands, also. These  allow 
  130. the  user to do such things as retrieve a desired image from  the 
  131. CD-ROM,  to  save an image to a file on hard disk, and  to  erase 
  132. only the graphics from the screen or to erase the entire  screen. 
  133. Users  may  execute batch command files to do a series  of  tasks 
  134. automatically.  Lastly, the user may, of course, EXIT the  IMDISP 
  135. program when done.
  136.  
  137. 2.3 GRAY LEVEL AND FALSE COLOR IMAGES
  138.  
  139.      Most  planetary  images  are composed  of  8-bit  DN  values 
  140. representing monochrome brightness levels in the scene. To obtain 
  141. color  images,  separate images are taken through  color  filters 
  142. (red,  green,  blue) and are then combined by  ground  processing 
  143. systems to produce a true color image. Only a very small fraction 
  144. of planetary images are available in color versions. Most display 
  145. and analysis is done on monochrome images.
  146.  
  147.      A display with 256 (2^8) gray levels is required to  present 
  148. the information contained in a standard image. However, the human 
  149. eye  can  only distinguish about 32 gray levels.  Thus  5-bit  DN 
  150. values  would satisfy most display  requirements.  Unfortunately, 
  151. computers  are  oriented to the storage of  and  manipulation  of 
  152. items  which are a power of two, and 5-bit pixels would  be  very 
  153. clumsy. The display devices which the IMDISP program supports are 
  154. limited  to 16 gray levels (PGA), 4 gray levels (EGA) or  2  gray 
  155. levels  (CGA).  The  16 gray levels of the PGA  are  adequate  to 
  156. support   image  analysis;  however  4  or  2  gray  levels   are 
  157. practically useless for viewing planetary images. Fortunately the 
  158. EGA display will support 16 different colors, and a color palette 
  159. can  be  selected  which  uses a graduated  scale  of  colors  to 
  160. represent  gray  levels, producing a "false color"  image  (false 
  161. because  the displayed color does not represent the actual  color 
  162. of the scene).
  163.  
  164.      A  false color image (also called a pseudo color  image)  is 
  165. created from a black and white image by assigning a color (rather 
  166. than a gray level) to each DN value in the image. For instance, a 
  167. DN  value  of 128 could be reassigned to yellow if  the  user  so 
  168. desired.  Ranges of DNs (e.g., 100-125) may also be assigned  one 
  169. color. Pseudo colors get assigned to DN values in a pseudo  color 
  170. table,  which the display program then uses to determine  how  to 
  171. color  the  image  on the monitor. Display  programs  often  have 
  172. preset   pseudo   color  tables  with  commonly   used   DN-color 
  173. combinations, and the user can simply call for one of these  when 
  174. generating  a pseudo color image. The option exists,  of  course, 
  175. for  users  to  generate their own pseudo  color  tables.  Pseudo 
  176. colors are often used to highlight features of an unusual  nature 
  177. in an image.
  178.  
  179.      Since  the Enhanced Graphic Adapter for the IBM PC  provides 
  180. only 4 gray shades (black, dark gray, light gray and white)  most 
  181. image viewing is done using a pseudo color table which interprets 
  182. gray  levels  as color values ranging from  black  through  reds, 
  183. greens and blues up to white.
  184.  
  185. 2.4 RADIOMETRIC AND GEOMETRIC CORRECTIONS
  186.  
  187.      All  camera systems have some kind of distortions  in  the 
  188. lens,  in  the  way the shutter works, etc.  Distortions  in  the 
  189. amount  of  fight transferred through the camera to  the  imaging 
  190. plate  are called radiometric distortions.  Geometric  distortion 
  191. affects  the "squareness" of an image, and is detected by  taking 
  192. an image of a geometric grid.
  193.  
  194.      For  spacecraft  cameras, both types of  distortion  can  be 
  195. measured  before  launch, and in a limited  fashion,  in  flight. 
  196. These measured distortions are saved in digital files. When a raw 
  197. image is received, these "calibration files," as they are called, 
  198. are  subtracted  from  (or  otherwise  applied  to)  the   image, 
  199. effectively  removing radiometric and geometric distortion.  This 
  200. process is called radiometric and geometric correction. Corrected 
  201. images  contain the closest possible representation of the  scene 
  202. being imaged.
  203.  
  204. 2.5 IMAGE FILE FORMATS
  205.  
  206.      Digital  image files are seldom stored as a simple array  of 
  207. pixels.  Generally there is an area at the beginning of an  image 
  208. file containing descriptive information about the image. This  is 
  209. referred to as a label or header area. Figure 2-1 shows a diagram 
  210. of a simple image format with a label area followed by the  image 
  211. lines.  In practice, images from planetary missions have  a  more 
  212. complicated   format,  due  to  the  need  to  store   additional 
  213. information  to  allow proper interpretation of the  image  data. 
  214. Figure  2-2  shows  the  format of a  Voyager  image,  which  has 
  215. engineering parameters embedded at the end of each image line  to 
  216. form a line suffix area, an engineering trailer record after  the 
  217. last image line, and this is followed by an image histogram.
  218.  
  219.  
  220.                  --------------------------      
  221.                 |  Labels or Header Area   |    
  222.                 |--------------------------|     
  223.                 |  Image Array Line 1      |    
  224.                 |--------------------------|    
  225.                 |  Image Array Line 2      |
  226.                 |--------------------------|
  227.                              .
  228.                              .
  229.                              .
  230.                  --------------------------
  231.                 |  Image Array Line n      |
  232.                  --------------------------
  233.  
  234.             Figure 2-1: Simple Image Format
  235.  
  236.      Different image label formats have been developed for use by 
  237. nearly  all image processing facilities. Two formats  are  widely 
  238. used  within the planetary and astronomy communities: the  VICAR2 
  239. (Video  Image  Communication and Retrieval) labels  used  by  the 
  240. Multi-Mission   Image  Processing  Laboratory  (MIPL)  and   FITS 
  241. (Flexible  Image  Transport)  labels  used  for  astronomy  image 
  242. interchange.  The PDS has developed a label scheme which is  very 
  243. similar  to  these  standards,  called  the  Object   Description 
  244. Language  (ODL). This format attempts to add a broader  range  of 
  245. data  descriptive capabilities to the proven capabilities of  the 
  246. existing label systems. A description of the ODL architecture  is 
  247. given in Appendix D.
  248.  
  249.      Most of the images stored on the PDS CDROM disks have either 
  250. ODL  or VICAR2 labels. IMDISP will automatically interpret  these 
  251. labels to determine the display format of the image data.
  252.  
  253.                  --------------------------------------      
  254.                 |  PDS ODL Labels                      |    
  255.                 |--------------------------------------|     
  256.                 |  Image Array Line 1    | Line Suffix |    
  257.                 |--------------------------------------|    
  258.                 |  Image Array Line 2    | Line Suffix |    
  259.                 |--------------------------------------|    
  260.                                   .
  261.                                   . 
  262.                                   .
  263.                  ---------------------------------------
  264.                 |  Image Array Line 800  | Line Suffix |    
  265.                 |--------------------------------------|    
  266.                 |  Image Engineering Trailer           |
  267.                 |--------------------------------------|
  268.                 |  Image Histogram                     |
  269.                  --------------------------------------
  270.  
  271.             Figure 2-2: Voyager CDROM Image Format
  272.  
  273. 2.6 CDROM FUNDAMENTALS
  274.  
  275.      The CDROM disk uses the same basic data storage format as  a 
  276. CD  audio  disk. In fact, data blocks are identified  by  minute, 
  277. second and sector number, following the audio format. Data blocks 
  278. are recorded along a spiral from the inner to the outer radius of 
  279. the  disk. Each raw data block (sector) contains 2,352  bytes  of 
  280. information,  with  304  bytes used for  housekeeping  and  error 
  281. correction  and 2,048 (2K) containing user data. Each data  block 
  282. is  called a sector, and 75 sectors are stored per second.  Since 
  283. the  nominal  playing time of a CD disk is 60 minutes,  the  data 
  284. storage capacity is 75 sectors per second * 60 seconds per minute 
  285. *  60  minutes  or  270,000 sectors.  Thus  the  nominal  storage 
  286. capacity  of a single CDROM disk is 540,000 kilobytes, which  can 
  287. be  extended  to  more  than  600,000  kilobytes  and  beyond  by 
  288. recording more than 60 minutes of data on a disk.
  289.  
  290.      In  order  to maximize the storage capacity of  CD  disks  a 
  291. constant  linear  velocity (CLV) recording format is  used.  This 
  292. means that the player changes speed (slows down) as it reads from 
  293. the  inside  to the outside of the disk, to maintain  a  constant 
  294. flow  of data under the read mechanism at a speed of  1.2  meters 
  295. per  second.  This is in contrast to most  magnetic  disk  drives 
  296. which  use  constant angular velocity (CAV)  storage,  where  the 
  297. information density is greater on the inner tracks that the outer 
  298. tracks.  While  the use of CLV recording  increases  the  storage 
  299. capacity  of CDROM disks, it reduces access time, since the  disk 
  300. must change speeds as it moves to different positions on the disk 
  301. radius.  The strategy for locating a recorded data block is  also 
  302. more  complicated than with constant angular  velocity  recording 
  303. technology.
  304.  
  305.      As  a  result  the average access time of  CDROM  drives  is 
  306. between 400 ms and 1 s, and the maximum data transfer rate to the 
  307. host  computer  is  150 kilobytes per  second.  These  rates  are 
  308. approximately  an order of magnitude slower than magnetic  disks. 
  309. Therefore,  the  access mechanisms to disk directories  and  data 
  310. must  be  customized  for CDROM in order  to  provide  acceptable 
  311. performance.
  312.  
  313.      The  development of a standard logical format for  recording 
  314. data  files  on  CDROM disks was taken on by  a  group  of  CDROM 
  315. applications  developers, hardware vendors and computer  vendors. 
  316. The  proposed standard resulting from this effort is  called  the 
  317. High   Sierra   format.  This  format  was   submitted   to   the 
  318. International Standards Organization (ISO) for consideration  and 
  319. approved  on October 5, 1987. The format used for the  PDS  CDROM 
  320. disks is dated May 28, 1986, and differs slightly from the  final 
  321. ISO standard. Microsoft and other CDROM software developers  have 
  322. committed to supporting this preliminary version of the format in 
  323. later  software  releases. However, software developed  by  other 
  324. vendors  to  support the ISO format (DEC for  example)  will  not 
  325. support the format of these disks.
  326.  
  327.  
  328.                             Chapter 3
  329.  
  330.                        IMDISP INSTALLATION
  331.  
  332.  
  333.      IMDISP requires an IBM PC, XT, AT or 100 percent  compatible 
  334. with  512K of base memory. It supports several  graphics  display 
  335. devices,  including  the  Enhanced Graphics  Adapter  (EGA),  the
  336. Video Graphics  Array  (VGA), the Professional  Graphics  Adapter  
  337. (PGA),  and  the  Color  Graphics  Adapter  (CGA).  The  hardware 
  338. environment  in which  the program  has been developed and tested 
  339. includes and  AT class computer,  deluxe or  enhanced  EGA  board 
  340. with 256K of memory, and multisync or multiscan monitor.
  341.  
  342. 3.1 PROGRAM SETUP
  343.  
  344.      The IMDISP program can be run from a floppy or hard disk. To 
  345. use  the program from a floppy disk, insert the program  disk  in 
  346. the  A: or B: drive and type the MSDOS command: "A:" or  "B:"  to 
  347. set the floppy disk as the default drive. To use the program from 
  348. hard disk first create a directory to hold the IMDISP files.  Use 
  349. the  MSDOS command "MKDIR \IMDISP" to create a directory to  hold 
  350. the programs. Use the "CHDIR \IMDISP" command to make IMDISP  the 
  351. default directory. Insert the distribution floppy disk in  floppy 
  352. disk  drive A:. Now type "COPY A:*.*" to copy the files from  the 
  353. distribution  disk to your hard disk. You should now be  able  to 
  354. run  all examples from that directory on your hard disk.  If  you 
  355. wish  to use IMDISP from other directories, you need  to  include 
  356. the  IMDISP directory in your MSDOS "PATH" command. This  command 
  357. provides MSDOS with a list of directories to search when  looking 
  358. for  a  program  file  to run. If you wish  to  run  IMDISP  from 
  359. different  directories, the \IMDISP subdirectory should be  added 
  360. to  the  PATH command in your AUTOEXEC.BAT file.  A  sample  path 
  361. command would look like this:
  362.  
  363.     PATH=C:\DOS;C:\UTIL;C:\WORDSTAR;C:\IMDISP
  364.  
  365.      The  sample  batch  files and special  pointer  label  files 
  366. included  on the distribution disk will only run if your  current 
  367. default directory is \IMDISP.
  368.  
  369.      You  may want to add a line to your AUTOEXEC.BAT file  which 
  370. will  allow you to abort the display program while running  batch 
  371. files or displaying large image files. If the command  "BREAK=ON" 
  372. is  placed  in  CONFIG.SYS,  you  will  (sometimes)  be  able  to 
  373. terminate the IMDISP program by typing the control and break keys 
  374. simultaneously. Different computer systems offer varying response 
  375. to  the  control-break command, and the use of this  command  may 
  376. effect other programs you use.
  377.  
  378. 3.2 CDROM SETUP
  379.  
  380.      To use the IMDISP program with PDS CDROM disks you will need 
  381. a  CDROM  reader, interface board, and software provided  by  the 
  382. vendor  which will make your CD Reader look like a disk drive  to 
  383. your  PC.  The details of setting up your hardware  and  software 
  384. configuration  are  beyond  the scope  of  this  manual,  however 
  385. several aspects of setup will be reviewed.
  386.  
  387.      There  are  many  potential  pitfalls  in  setting  up  your 
  388. hardware and interface board. Read the directions carefully,  and 
  389. don't  assume that "default" switch settings are  correct.  Check 
  390. all  switches  to  see that they correspond  to  the  recommended 
  391. settings.
  392.  
  393.      To  work  properly with the batch command  and  label  files 
  394. provided  with  IMDISP, your CDROM drive should be set up  to  be 
  395. drive letter "L:". Most vendor software allows you to select  the 
  396. drive letter which will be assigned to the CDROM reader.
  397.  
  398. 3.2.1 Microsoft Extensions
  399.  
  400.      If  you are using the Microsoft Extensions you will  load  a 
  401. CDROM  device  driver  as part of your CONFIG.SYS  file  (or  two 
  402. drivers  if  using the Philips or DEC readers) with a  line  like 
  403. this:
  404.  
  405.      DEVICE=HITACHI.SYS /D:CDROM1 /N:1 
  406.  
  407. This command assumes that the driver file "HITACHI.SYS"is located 
  408. in  your ROOT directory. The /D:CDROM1 switch assigns  a  logical 
  409. name CDROM1 to the drive. A name must be supplied, and is used to 
  410. identify this device, in case more than one CDROM drive is  being 
  411. used on your system. The name should not be the same as the  name 
  412. of any file stored on your system. An attempt to open a file with 
  413. the  same  name as the device driver will result  in  the  device 
  414. driver being opened, not the file. The /N:1 switch indicates that 
  415. this  is drive 1. This switch is used since some CDROM  interface 
  416. cards support multiple drives.
  417.  
  418.      Other commands which should be included in CONFIG.SYS if you 
  419. are using a CDROM drive with the Microsoft Extensions are:
  420.  
  421.      LASTDRIVE=Z 
  422.      FILES=30
  423.      BUFFERS=50
  424.  
  425.  
  426.      The LASTDRIVE command tells MSDOS to allow for enough  drive 
  427. letters to support the CDROM drive, plus any other drives on your 
  428. system. Using LASTDRIVE=L should also work in most circumstances. 
  429. The  files and buffers specifications provide  sufficient  system 
  430. work area to support CDROM operations.
  431.  
  432.      You  must  also execute a program  called  MSCDEX.EXE  which 
  433. allows  access to the CDROM drive as if it were a disk  drive  on 
  434. your system. This command can be put in your AUTOEXEC.BAT file so 
  435. that it is automatically run whenever you start-up your computer. 
  436. The command format is:
  437.  
  438.      MSCDEX /D:CDROM1 /L:L /M:20 /V /E
  439.  
  440.      Several  MSCDEX command switches are illustrated.  The  /L:L 
  441. command  assigns  the drive name L: to the CDROM  drive.  The  /D 
  442. switch  gives the device name of the CDROM drive (which  must  be 
  443. the  same  name  used  in  the  device  name  parameter  of   the 
  444. "DEVICE=CDROM.SYS"  command  in the CONFIG.SYS  file.  The  /M:20 
  445. switch  assigns  twenty 2K blocks of memory as a buffer  for  use 
  446. with CDROM data. The /V switch provides verbose messages when the 
  447. installation  program  is run, and /E tells the  program  to  use 
  448. expanded memory for the cache area.
  449.  
  450. 3.2.2 Other Driver Software
  451.  
  452.      Some   vendors  (Reference  Technology,  TMS)  offer   CDROM 
  453. software  which  is comparable to the Microsoft  Extensions.  Our 
  454. experience  with these software packages is that they modify  the 
  455. internals of MSDOS and may cause unpredictable results with  your 
  456. other  PC software. They often do not support CDROM  applications 
  457. designed  to work with the MSDOS extensions for CDROM and  cannot 
  458. be used with the IMDISP FILE prompt mode.
  459.  
  460. 3.2.3 Problems with CDROM Software
  461.  
  462.      The  PDS CDROM disks utilize a feature of the  CDROM  format 
  463. standard which provides extended attribute records to define  the 
  464. physical  characteristics  of data files. These records  will  be 
  465. used  by VAX and other minicomputer systems where  the  operating 
  466. system  allows  a  variety of record  formats  (fixed,  variable, 
  467. stream).  Many  of  the earlier implementations  of  High  Sierra 
  468. software  failed to recognize these records, which are placed  at 
  469. the  beginning of a file's data area. If your CDROM software  was 
  470. developed prior to April 1987, it may interpret these records  as 
  471. part of the data file, causing the first 2K bytes of each file to 
  472. appear as meaningless binary data. Users with this problem should 
  473. contact  their hardware or software vendors for updated  versions 
  474. of  the  CDROM software. The IMDISP program has been  patched  to 
  475. recognize and skip over these records on the PDS CDROM disks, but 
  476. these  patches  may not support other CDROM disks  with  extended 
  477. attribute records.
  478.  
  479. 3.3 DISPLAY DEVICE CHARACTERISTICS
  480.  
  481.      IMDISP  automatically  finds out which display  devices  are 
  482. available  (PGA,  EGA, or CGA) and uses the  one  available.  The 
  483. Enhanced  Graphics Adapter must have at least 128K of  memory  to 
  484. work  properly. Use of the Color Graphics Adapter is  discouraged 
  485. because the pixels have no gray levels, only black or white.
  486.  
  487.      The  display  coordinates start at (1,1) in the  upper  left 
  488. corner  of the screen; the line direction is down and the  sample 
  489. direction is to the right.
  490.  
  491. 3.3.1 Enhanced Graphics Adapter (EGA)
  492.  
  493.      The   EGA  is  a  bit-mapped  display  device  providing   a 
  494. resolution  of  350  lines  by 640 samples  of  4-bits  each.  It 
  495. produces  a  digital video signal for each  primary  color  (red, 
  496. green  and blue), The video signal for each color can be  set  to 
  497. one  of four levels, roughly equivalent to off, low,  medium  and 
  498. high.  Thus the number of possible colors (color palette)  is  64 
  499. (4^3). The following table illustrates the colors created by some 
  500. of the different combinations of red, green and blue.
  501.  
  502.   Red=   off, Green=   off, Blue=   off   results in Black
  503.   Red=   low, Green=   off, Blue=   off   results in Dark Red
  504.   Red=medium, Green=   off, Blue=   off   results in Light Red
  505.   Red=  high, Green=   off, Blue=   off   results in Bright Red
  506.   Red=   low, Green=   low, Blue=   low   results in Dark Gray
  507.   Red=medium, Green=   low, Blue=   off   results in Brown
  508.   Red=medium, Green=medium, Blue=   off   results in Yellow
  509.   Red=medium, Green=medium, Blue=medium   results in Light Gray
  510.   Red=  high, Green=   low, Blue=   off   results in Orange
  511.   Red=  high, Green=  high, Blue=  high   results in White
  512.  
  513.          Table 3-1: Sample EGA Color Palette Settings
  514.  
  515.  
  516.      The  EGA display is limited to only 16 colors out of the  64 
  517. possible, because only 4-bits are used to store each pixel  value 
  518. in memory. This 4-bit pixel value points to an entry in the color 
  519. table  which  represents one of the 64 possible  combinations  of 
  520. red, green and blue which can be displayed.
  521.  
  522.      Many  of  the  newer EGA boards are  capable  of  displaying 
  523. additional lines and samples when using a Multisync or  Multiscan 
  524. monitor.  The  standard  EGA uses a  16  Mhz  crystal  oscillator 
  525. (something like a clock which regulates the display speed), which 
  526. limits  the video output rate to the equivalent of 640 pixels  by 
  527. 350  lines.  The  EGA  circuitry  allows  for  a  faster  crystal 
  528. oscillator to be added to the board (24 Mhz and beyond)  allowing 
  529. about 25 percent more lines to be displayed (480 lines instead of 
  530. 350).  A  method for adding this capability to  an  existing  EGA 
  531. board  (for  about  $10  worth of  parts)  is  described  in  the 
  532. September 16, 1986 issue of PC Magazine.
  533.  
  534.      This mode requires that a multisync or multiscan monitor  be 
  535. attached to the computer, and there is no way for the program  to 
  536. automatically  detect  the  presence  of  the  special   monitor. 
  537. Therefore  this  display mode is invoked by specifying  an  MSDOS 
  538. "ENVIRONMENT"  variable. This is done by issuing an  MSDOS  "SET" 
  539. command at the MSDOS prompt as follows:
  540.  
  541.     SET EGA480=TRUE
  542.  
  543.      This command can also be put in your AUTOEXEC.BAT file using 
  544. a  text editor, so that you need not invoke it each time you  run 
  545. IMDISP.   It  should  have  no  effect  on  other  MSDOS   system 
  546. operations.  There  is a chance that adding  this  variable  will 
  547. exceed  the size reserved by MSDOS for environment variables.  If 
  548. so,  you  should  consult  your  MSDOS  manual  to  increase  the 
  549. environment size on your system. The environment variable can  be 
  550. removed with the MSDOS command:
  551.  
  552.     SET EGA480=
  553.  
  554.      Where a carriage return is typed immediately after the equal 
  555. sign. The 480 line mode requires an additional 83K of memory  for 
  556. the refresh buffer. If you try this mode and receive the  message 
  557. "Insufficient memory for line buffer", it is probably because you 
  558. have  a  512K memory machine, or have  memory  resident  programs 
  559. operating (like Sidekick or Superkey) which reduce the  available 
  560. memory to less than about 400K. You will need to use the 350 line 
  561. mode  or remove some memory resident programs to operate  in  480 
  562. line mode.
  563.  
  564.      Users  of the EGA with Multisync and Multiscan monitors  can 
  565. achieve  a  16 gray level display through the use  of  a  special 
  566. device  called the Grayscaler 1, from Avocado Computer, Box  632, 
  567. Yorba  Linda, Ca, 92686, (714) 528-1025. This cable converts  the 
  568. digital  video  signals  produced  by the  EGA  board  to  analog 
  569. signals.  By selecting appropriate EGA palette entries, a  fairly 
  570. good  representation of 16 gray levels can be achieved  (use  the 
  571. palette selection "PAL LOAD GRAY16.PAL" to select this palette).
  572.  
  573. 3.3.2 Video Graphics Array (VGA)
  574.  
  575. This version (2.1) of the IMDISP program includes support for the 
  576. IBM Video Graphics Array (VGA) display device.  The VGA  produces 
  577. an  analog display with several new color modes.   Of  particular 
  578. interest  to  IMDISP users are the 640 x 480 line  mode  with  16 
  579. displayable  colors (or gray levels) and the 320 x 240 line  mode 
  580. with 256 displayable colors (or 64 gray levels).  This version of 
  581. IMDISP supports the 640 x 480 mode.  
  582.  
  583. To  set  the VGA display mode you must set  a  MSDOS  environment 
  584. variable prior to executing IMDISP.
  585.  
  586. To set the environment variable use the MSDOS command:
  587.  
  588. SET VGA=TRUE
  589.  
  590. This will put the display in 640 sample by 480 line mode, with 16 
  591. gray  levels or colors displayable from a palette of  256K.   The 
  592. display  is  initialized  with  a  gray  scale  palette,  but   a 
  593. pseudocolor  palette can be invoked with the IMDISP command  "PAL 
  594. PS 0".  The "PALETTE EDIT" command will allow you to step forward 
  595. or  backward  through the 64 available shades  for  each  primary 
  596. color.   See  the  next  section  of  the  IMDISP manual for more 
  597. information on the palette edit function.  
  598.  
  599. 3.3.3 Professional Graphics Adapter (PGA)
  600.  
  601.      The PGA is a special graphics board developed by IBM for use 
  602. with CAD/CAM applications on the IBM PC. Because its architecture 
  603. is incompatible with the CGA and EGA boards, it has not been well 
  604. received by software developers. The PGA provides an analog video 
  605. signal  with a display resolution of 480 lines by 640 samples  of 
  606. 8-bits  each. It provides 16 intensities for each primary  color, 
  607. resulting  in a palette of 4,096 colors (16^3). The  color  table 
  608. allows 256 colors to be displayed simultaneously, however only 16 
  609. gray levels can be selected. 
  610.  
  611. 3.3.4 Color Graphics Adapter (CGA)
  612.  
  613.      The  CGA  display  is a bit-mapped graphics  device  with  a 
  614. resolution of 200 lines by 640 samples of 1-bit each. It supports 
  615. only 2 colors in this display mode, black and white. This display 
  616. can  be used to get a general idea of the contents of  a  digital 
  617. image,  or for displaying one bit images (graphics  for  example) 
  618. but is not recommended for use with the PDS CDROM images.
  619.  
  620.  
  621.                           Chapter 4
  622.  
  623.                        IMDISP OPERATION
  624.  
  625.      IMDISP can be used to display images up to several  thousand 
  626. lines and samples with a variety of pixel formats. These  formats 
  627. include  bit (1 bit), nibble (4 bits), byte (8 bits), or  integer 
  628. (16  bits). Integer pixels are assumed to be byte-swapped,  which 
  629. means  that  the  sign and most significant 7 bits  are  in  the 
  630. rightmost  byte,  and  the least significant 8 bits  are  in  the 
  631. leftmost byte. This is the convention used by both the IBM PC and 
  632. VAX  computer hardware families. IBM mainframes and 68000  series 
  633. computers  (Macintosh and Sun, for example)  use  un-byte-swapped 
  634. integers.
  635.  
  636.      Program  interaction with the user is via commands typed  in 
  637. response to the "COMMAND:" prompt. Most interaction is  performed 
  638. on  the graphic display screen, and program messages are  printed 
  639. over  any  image  display currently on the  screen.  The  REFRESH 
  640. command can be used to restore an image after other commands have 
  641. written  text over the display. The ERASE command can be used  to 
  642. clear  away  the  clutter left by  program  status  messages  and 
  643. previously  displayed  images. The screen  is  not  automatically 
  644. erased after each operation in order that multiple images can  be 
  645. displayed simultaneously, or so a histogram can be placed on  the 
  646. screen with the image.
  647.  
  648.      IMDISP  is invoked by typing "IMDISP" or "IMDISP  filename", 
  649. where  filename  is the name of an image file to  be  opened  for 
  650. processing  at program start-up. The filename may include a  disk 
  651. drive and path name specification.
  652.  
  653.      The  program  will blank the display screen  and  display  a 
  654. welcome logo, then the prompt "COMMAND:" will appear in the lower 
  655. left  portion  of the screen. If a filename is  included  in  the 
  656. command invocation, the welcome message is not displayed and  the 
  657. screen will display the COMMAND: prompt.
  658.  
  659.      Typing  "HELP" at the command prompt will provide a list  of 
  660. IMDISP commands. The most frequently used commands are "FILE"  to 
  661. open  a  file for processing, and "DISPLAY" to display  an  image 
  662. once the file has been opened.
  663.  
  664. 4.1 COMMAND SYNTAX
  665.  
  666.      The command line syntax is of the form:
  667.  
  668.      COMMAND KEYWORD1 = VALUE1 KEYWORD2=VALUE2 KEYWORD3 VALUE3 . . .
  669.  
  670.      The command line may be typed in either upper or lower case. 
  671. The  command  and  the  keyword names may  be  abbreviated  to  3 
  672. characters  in most cases. Any number of spaces may  be  inserted 
  673. between  words, and the keyword and value may be separated  by  a 
  674. space  or an equals sign. Some keywords do not require  a  value. 
  675. All  keywords are optional and have default values.  
  676.  
  677. 4.2  COMMAND DESCRIPTION
  678.  
  679.      Table  4-1 presents a summary of IMDISP commands.  They  are 
  680. separated  into  3 groups, file  manipulation  commands;  display 
  681. commands  and  program  control commands.  Only  the  capitalized 
  682. letters are required to specify a command.
  683.  
  684. 4.3 OPERATING MODES
  685.  
  686.      Several  of  the commands invoke special  program  operating 
  687. modes.  These  include  the FILE command when  issued  without  a 
  688. filename  argument  and  the CURSOR,  PROFILE  and  PALETTE  EDIT 
  689. commands.  The FILE mode displays a list of files in the  current 
  690. directory  on the screen for selection. It also contains  several 
  691. subcommands  for  controlling the display of files  on  the  menu 
  692. screen.  In  the CURSOR, PROFILE and PALETTE  EDIT  commands  the 
  693. cursor  keys  (arrow  keys) on the numeric  keypad  are  used  in 
  694. conjunction  with other keys to control program operation.  These 
  695. modes  are  exited  by typing either a  period  '.'  or  carriage 
  696. return.
  697.  
  698. File oriented commands:
  699.  
  700.        CD or CHDIR      . . . . to change the default directory
  701.        DIRECTORY        . . . . to perform the MSDOS directory command
  702.        FILE             . . . . to specify the name of the image
  703.        SAVE             . . . . to save the image display to a file
  704.        TYPE             . . . . to perform the MSDOS type command
  705.        LABEL            . . . . to display the image labels
  706.  
  707. Display commands:
  708.  
  709.        DISPLAY          . . . . to display the image
  710.        ERASE            . . . . to erase the display
  711.        REFRESH          . . . . to refresh the image plane
  712.        PALETTE          . . . . to adjust the palette for the display
  713.        HISTOGRAM        . . . . to display the histogram of the image
  714.        SET              . . . . to set DN value range
  715.        STRETCH          . . . . to do a linear gray scale stretch
  716.        CURSOR           . . . . to move the cursor around
  717.        PROFILE          . . . . to plot a profile of the image
  718.        TEXT             . . . . to draw text on the image
  719.  
  720. Program control commands:
  721.  
  722.        BATCH            . . . . to execute a batch command file
  723.        MENU             . . . . to select images from a menu file
  724.        EXIT or QUIT     . . . . to exit from the program
  725.        HELP             . . . . Display help information
  726.        SYSTEM           . . . . execute an MSDOS command
  727.  
  728.                  Table 4-1: IMDISP Command Summary
  729.  
  730. 4.4 ERROR HANDLING
  731.  
  732.      If  an invalid command is issued at the COMMAND: prompt  the 
  733. program will beep and return to the COMMAND: prompt. In  handling 
  734. command  parameters the program takes action on those  parameters 
  735. that are recognized, but ignores invalid parameters. For example, 
  736. issuing a "SET LO = 25 HI = 100" command will not have any effect 
  737. since  the proper parameter names for the SET command are  "DNLO" 
  738. and "DNHI".
  739.  
  740.      It  is  also  possible  for  certain  system  errors  to  be 
  741. encountered  which  cause  the  program  to  abort  leaving  your 
  742. computer  in  graphics mode. N you are  using  certain  utilities 
  743. which reset the default text mode screen colors (like the  Norton 
  744. Utilities  screen attributes command) you may not be able to  see 
  745. what is being printed on the screen. The simplest approach is  to 
  746. perform  a  warm  boot,  by  typing  the  Ctrl,  Alt,  Del   keys 
  747. simultaneously. Alternately, you can often type IMDISP then  EXIT 
  748. to  reset the computer to text mode. Errors in  processing  image 
  749. files on CDROM, hard disk or floppy disks can cause these aborts.
  750.  
  751. 4.5 COMMAND REFERENCE
  752.  
  753.      This  section lists all IMDISP commands  alphabetically  and 
  754. describes  their  function,  parameters  which  control   command 
  755. operation,  and provides examples of command use, In the  command 
  756. and parameter description the following conventions are used:
  757.  
  758.   filename    represents the name of an MSDOS file, and may include 
  759.               an optional drive identifier and path specification.
  760.  
  761.   n           represents an integer value.
  762.  
  763. 4.5.1 BATCH
  764.  
  765.      The  BATCH command reads commands from the  specified  batch 
  766. command file. If no file name is specified the current  directory 
  767. is  searched for a file named BATCH.CMD. The CURSOR, PROFILE  and 
  768. PALETTE  EDIT  commands should not be used within  batch  command 
  769. files since they require interactive inputs from the keyboard.
  770.  
  771.      The BATCH command may take the following argument:
  772.  
  773.    filename    filename of batch command file.
  774.  
  775.      A  batch  file is simply a text file containing  a  list  of 
  776. commands,  with each command terminated by a carriage return.  If 
  777. the  command file is created with a word processor,  the  program 
  778. should be used in the non-document mode, to assure that  carriage 
  779. returns  are  embedded  between  command  lines.  An  example  of 
  780. creating a batch file to display the PDS logo image follows.
  781.  
  782.      At the MSDOS command level type:
  783.  
  784.      COPY CON TEST.CMD 
  785.      FILE LOGO.IMG
  786.      DISP ZOOM 4 
  787.      DISP ZOOM 2
  788.      DISP 
  789.      DISP SUB 2
  790.      EXIT
  791.  
  792.      Now  run IMDISP and type"BATCH TEST.CMD" at  the  "COMMAND:" 
  793. prompt.  Make  sure  the  file  "LOGO.IMG"  is  in  your  current 
  794. directory.  The  PDS logo should be displayed on  the  screen  in 
  795. several different sizes.
  796.  
  797. 4.5.2 CD or CHDIR
  798.  
  799.      The  CD or CHDIR command is used just as it is at the  MSDOS 
  800. command level to change the current default directory.
  801.  
  802.      The   argument   of  the  CD  command  is  the   path   name 
  803. specification  of  the new default directory.  For  example,  "CD 
  804. \IMDISP\IMAGES"  would make \IMDISP\IMAGES the current  directory 
  805. if  it  exists.  To  change the current  default  drive  use  the 
  806. "SYSTEM"  command  ("SYSTEM  L:"   for  example)  or  the  "FILE" 
  807. command.  If there is not enough memory available for the  system 
  808. command to be executed an error message is displayed.
  809.  
  810. 4.5.3 CURSOR
  811.  
  812.      The CURSOR command is used to select a point in a  displayed 
  813. image  for  subsequent display commands. When first  invoked,  it 
  814. places  a  small  cursor  symbol at the  center  of  the  screen. 
  815. Depending  on the current contents of the screen, the cursor  may 
  816. be  hard  to see. Moving it with the arrow keys  on  the  numeric 
  817. keypad will help you locate it.
  818.  
  819.      Whenever  the cursor is moved, the current line  and  sample 
  820. location  of  the cursor and the DN value of the  pixel  at  that 
  821. point  is printed in the lower right portion of the  screen.  The 
  822. cursor  will move 16 pixels in the selected direction unless  the 
  823. movement value is adjusted using the + or  keys.
  824.  
  825.                         Numeric Keypad Keys
  826.                    -------------------------------
  827.                   |   7   |   8   |   9   | PrtSc |
  828.                   |  Home |  Up   |  PgUp |       |
  829.                    -------------------------------
  830.                   |   4   |   5   |   6   |   -   |
  831.                   |  Left |       | Right |       |
  832.                    ------------------------------- 
  833.                   |   1   |   2   |   3   |   +   |
  834.                   |  End  | Down  |  PgDn |       |
  835.                    -------------------------------
  836.  
  837.                       Action of Keypad Keys:
  838.  
  839.                       7 = Move up and left.
  840.                       8 = Move up.
  841.                       9 = Move up and right.
  842.                       4 = Move left.
  843.                       5 = Not active.
  844.                       6 = Move right.
  845.                       1 = Move down and left.
  846.                       2 = Move down.
  847.                       3 = Move down and right.
  848.                       - = Decrement cursor movement value.
  849.                       + = Increment cursor movement value.
  850.  
  851.  
  852.              Table 4-2: IMDISP Cursor Keys
  853.  
  854.      Cursor  mode is exited by typing a "." (period) or  carriage 
  855. return. The cursor position is retained for future use in DISPLAY 
  856. commands  which  use the CENTER option. It is  very  useful  with 
  857. large  images where the entire image may be displayed  using  the 
  858. subsample option, then a point selected for subsequent display at 
  859. full resolution.
  860.  
  861.      Example:  Type  "FILE  MONTAGE.IMG" followed  by  "DISP"  to 
  862. display  the  MONTAGE.IMG file.  Type "CUR" to enter  the  cursor 
  863. mode,  then move the cursor to the center of the Uranus image  in 
  864. the  upper left corner of the image using the up and  left  arrow 
  865. keys.  Now type "." to exit cursor mode, then type "DISP  ZOOM  4 
  866. CENTER"  which will display Uranus as a large grainy ball on  the 
  867. screen.
  868.  
  869. 4.5.4 DIR
  870.  
  871.      The  DIR command is used just as the MSDOS dir command.  Its 
  872. argument  is  passed to MSDOS for execution. At the  end  of  the 
  873. directory  listing the screen will display "Type carriage  return 
  874. to  continue:" which will return to the IMDISP command  mode.  If 
  875. there is not enough memory available for the system command to be 
  876. executed an error message is displayed.
  877.  
  878. 4.5.5 DISPLAY
  879.  
  880.      The  DISPLAY command reads an image file and displays it  on 
  881. the  the screen. If the image is larger than the display  screen, 
  882. the default mode is to display as much of the upper left  portion 
  883. of the image as will fit on the screen. The SUBSAMPLE keyword  can 
  884. be   used  to  select  every  'n'  lines  and  samples  so   that 
  885. representations  of very large images may be displayed. The  ZOOM 
  886. keyword  can  be  used to enlarge a portion of an  image  on  the 
  887. display screen. Keywords can be specified to begin displaying  at 
  888. any line and sample in the image with the SL (starting line)  and 
  889. SS  (starting  sample).  If only a limited number  of  lines  and 
  890. samples  are  to  be displayed the NL (number of  lines)  and  NS 
  891. (number of samples) keywords can be used. The UP, DOWN, LEFT  and 
  892. RIGHT  keywords can be used to display different portions of  the 
  893. image,  relative to the currently displayed portion. The  display 
  894. can also placed at any point on the screen using the DSL (display 
  895. starting line) and DSS (display starting sample) keywords.
  896.  
  897.      DISPLAY takes the following keywords :
  898.  
  899.       SUBsample n  a positive integral subsampling factor for
  900.                    displaying images larger than the size of the 
  901.                    screen.  SUB=2 would display an image at half 
  902.                    the resolution.  
  903.   
  904.       If the image lines and samples look like this:
  905.  
  906.                                   sample values 
  907.  
  908.                 line 1            1  2  3  4  5 
  909.                 line 2            6  7  8  9 10
  910.                 line 3           11 12 13 14 15    
  911.  
  912.       Then the command DISP SUB 2 would produce:
  913.  
  914.                                   sample values
  915.  
  916.                 line 1            1  3  5 
  917.                 line 2           11 13 15    
  918.  
  919.       ZOOM n        a positive integral zoom factor for looking at
  920.                     part of an image close up.  The zoom command 
  921.                     replicates pixels by the integer value specified.  
  922.                     If the image lines and samples look like this:
  923.  
  924.                                   sample values
  925.  
  926.                 line 1            1  2  3  
  927.                 line 2            4  5  6
  928.                 line 3            7  8  9
  929.  
  930.       Then the command ``zoom 2" would produce the following:
  931.  
  932.                                   sample values 
  933.  
  934.                 line 1            1  1  2  2  3  3  
  935.                 line 2            1  1  2  2  3  3  
  936.                 line 3            4  4  5  5  6  6  
  937.                 line 4            4  4  5  5  6  6
  938.                 line 5            7  7  8  8  9  9
  939.                 line 6            7  7  8  8  9  9
  940.  
  941.  
  942.       CENTER     center the display around current cursor position. 
  943.                  This command is very useful when displaying large 
  944.                  images or when zooming in on selected areas. 
  945.       NL n
  946.       NS n       number of lines or samples from the image file to display
  947.  
  948.       SL n
  949.       SS n       starting line or sample within the image file to display
  950.  
  951.       UP n
  952.       DOWN n     adjusts the starting line up or down from the 
  953.                  previous value, thereby moving the display window 
  954.                  up or down in the image.  The default amount to 
  955.                  move up or down is the size of the display.
  956.  
  957.       LEFT n
  958.       RIGHT n    adjusts the starting sample left or right from the 
  959.                  previous value, thereby moving the display window 
  960.                  left or right in the image
  961.         
  962.       DSL n
  963.       DSS n      start the image display at the specified line and 
  964.                  sample on the display screen.
  965.  
  966.      Examples: The user wants to display an entire Voyager  image 
  967. (800  x 800) on the display screen then display a portion of  the 
  968. image  at full resolution. Type "FILE MIRANDA1.LBL",  then  "DISP 
  969. SUB  2" to display the entire image at half resolution,  Use  the 
  970. CURSOR  command  to move the cursor to the center of an  area  of 
  971. interest.  Exit  the cursor mode by typing ".", then  type  "DISP 
  972. CENT"  to  display  the selected portion of  the  image  at  full 
  973. resolution.
  974.  
  975.      The  user wishes to place 2 images which are each 800  lines 
  976. by  800 samples on the screen next to each other. The first  file 
  977. is opened with "FILE IMAGE1.IMG".  The "DISPLAY SUB 4" command is 
  978. given to display every 4th line and sample of the image to create 
  979. a 200 x 200 display. Next the "FILE IMAGE2.IMG" command is given. 
  980. Now a "DISPLAY SUB 4 DSS 201" is given to place the second  image 
  981. on  the screen starting at display sample position 201,  next  to 
  982. the first image.
  983.  
  984. 4.5.6 ERASE
  985.  
  986.      The command ERASE causes the screen to be erased by  setting 
  987. all  of  the  pixels to 0, which may  not  necessarily  be  black 
  988. depending on the palette setting. 
  989.  
  990. 4.5.7 EXIT
  991.  
  992.      The  EXIT command exits IMDISP and returns the user  to  the 
  993. MSDOS  operating  system. The contents of the image  display  and 
  994. refresh buffer are discarded.
  995.  
  996. 4.5.8 FILE
  997.  
  998.      FILE does not take a keyword, just a value which is the file 
  999. name.  The  specified file will be opened, or  an  error  message 
  1000. issued  if the file cannot be opened. The capability to  directly 
  1001. address  any sector on the CDROM disk by providing  its  physical 
  1002. address  (minute, second and sector number) is also available  to 
  1003. users of the Microsoft Extensions software.
  1004.  
  1005.      If  the  FILE command is specified without a  filename,  the 
  1006. program  will  display  a  list of  file  names  in  the  current 
  1007. directory.  Each  file name is preceded by a number.  Typing  the 
  1008. number  associated  with a file name will select  that  file  for 
  1009. processing.  File  names  that  actually  represent  lower  level 
  1010. directories  are  indicated  with a <d> symbol  after  the  name, 
  1011. Directories  can  be traversed downward by selecting  the  number 
  1012. associated  with  a  directory  name.  Upward  traversal  is   by 
  1013. selecting  the  item  identified as PARENT DIR.  This  will  move 
  1014. upward in the directory hierarchy.
  1015.  
  1016.      The  prompt  mode clears the screen and displays a  menu  of 
  1017. files  and commands. These commands allows specification  of  the 
  1018. default  drive, a file "mask" to use in selecting file names  for 
  1019. display and options for moving through the list of files when the 
  1020. current directory contain more than 30 files. The top line of the 
  1021. display  also  indicates  how  many  files  are  in  the  current 
  1022. directory.  After  exiting  the FILE prompt  mode,  the  previous 
  1023. contents  of  the  display  screen can  be  recovered  by  typing 
  1024. "REFRESH".
  1025.  
  1026.      The FILE prompt mode subcommands:
  1027.  
  1028.          D       select default disk drive
  1029.          M       specify a file selection mask to use in displaying 
  1030.                  files on the screen.
  1031.          N       display the next set of file names on the screen 
  1032.                  if there are more files in the current directory 
  1033.                  than can be displayed on one screen.
  1034.          P       display the previous set of file names.
  1035.          Q       quit the file selection mode and return to IMDISP 
  1036.                  command mode.
  1037.  
  1038.      The  N, P and Q commands are executed immediately. If the  D 
  1039. or M commands are selected, the user is prompted to enter a drive 
  1040. letter or file mask.
  1041.  
  1042.      If  the file selected by the "FILE filename" or FILE  prompt 
  1043. mode has a valid label, either PDS or VICAR2, then the number  of 
  1044. lines  and samples and the pixel size will be displayed.  If  the 
  1045. file  is unlabeled then the program will prompt for the values  to 
  1046. use  for the number of lines and samples, the number of bits  per 
  1047. pixel,  and  the  number of header bytes.  PDS  detached  labeled 
  1048. images  can  also be displayed. The specified  file  remains  the 
  1049. current file until a new FILE command is given. The FILE  command 
  1050. resets  the  SET  DNLO and SET DNHI values  to  the  minimum  and 
  1051. maximum  for the pixel size (normally 0 and 255). If a  specified 
  1052. filename  is  not found in the current directory  then  an  error 
  1053. message is displayed.
  1054.  
  1055.      If  the  unlabeled  image has a regular format,  that  is  a 
  1056. uniform  structure of repeating lines and samples, the  user  can 
  1057. specify  this  information  when prompted  by  the  program.  For 
  1058. example,  an  image named ASTERIA.DAT with one 1422  byte  header 
  1059. block  followed by an image composed of 370 lines by 450  samples 
  1060. of 8 bit pixels would be processed as follows:
  1061.  
  1062. At  the COMMAND: prompt type "FILE ASTERIA.DAT" The program  will 
  1063. display the message:
  1064.  
  1065.     Input file does not have a proper label.
  1066.     Input number of lines: 370                enter the value 370
  1067.     Input number of samples: 450              enter the value 450
  1068.     Input size of each sample: 8              enter the value 8
  1069.     Input size of header label: 1422          enter 1422 for the 
  1070.                                               size of the foreign 
  1071.                                               label block).
  1072.  
  1073.      The  COPIM  utility can be used to add a PDS  label  to  the 
  1074. beginning  of  such a file, so that it can be  used  subsequently 
  1075. without having to specify all the parameters separately.
  1076.  
  1077.      The  physical address of a data block on the CDROM can  also 
  1078. be  specified using the syntax 'FILE "CD:mm:ss:bb"', where mm  is 
  1079. the minute, ss the second, and bb the sector block number of  the 
  1080. beginning  of the desired data area. The CD:mm:ss:nn must  be  in 
  1081. double quotes and the CD must be capitalized! This mechanism  can 
  1082. be  used  to access files on non-High Sierra format  disks.  This 
  1083. will  only  work  on  systems  using  the  Microsoft   Extensions 
  1084. software.
  1085.  
  1086. 4.5.9 HELP
  1087.  
  1088.  
  1089.      HELP  displays the online help message. If followed  by  the 
  1090. name  of  a  valid  command  the  message  for  that  command  is 
  1091. displayed.  HELP is not provided for MSDOS commands (DIR,  CHDIR, 
  1092. CD and TYPE).
  1093.  
  1094. 4.5.10 HISTOGRAM
  1095.  
  1096.  
  1097.      The HISTOGRAM command produces a plot showing the number  of 
  1098. pixel  values  in  the image at each DN level. The  range  of  DN 
  1099. values  is displayed on the x-axis and the number of  occurrences 
  1100. of a specific DN value on the y-axis (See Figure 4-1).
  1101.  
  1102.      The  HISTOGRAM command reads through the  image,  calculates 
  1103. the  histogram,  and then displays the plot on  the  screen.  The 
  1104. histogram is scaled so that the third highest histogram value  is 
  1105. used  as  the maximum. It is recommended that  the  SUBSAMPLE  or 
  1106. other   subsetting  keywords  be  used  to  speed  up   histogram 
  1107. calculation,  which  can be quite slow for large images  and  for 
  1108. images  stored on CDROM. Histogram plots are displayed on top  of 
  1109. any image currently displayed on the screen, so the user may wish 
  1110. to  use  the  ERASE command to clear the screen  prior  to  using 
  1111. HISTO.  After  the  histogram  is displayed,  the  image  can  be 
  1112. restored using the REFRESH command.
  1113.  
  1114.        27582  |            .
  1115.               |           .. 
  1116.               |          ....
  1117.     COUNT     |         .....
  1118.               |        .......
  1119.               |       .........
  1120.               |     ............
  1121.               |   ...............
  1122.               --+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  1123.               0      64      128     192     256                
  1124.                           DN value
  1125.  
  1126.             Figure 4-1: Sample Image Histogram
  1127.  
  1128.  
  1129.      By  evaluating  the histogram, the user  can  determine  the 
  1130. optimum settings for the SET (DNLO and DNHI) command to produce a 
  1131. useful  display.  In  the  example  above,  the  image  data  are 
  1132. clustered  between  DN  values  32 and  144.  Using  the  default 
  1133. settings  of  the EGA display mode the colors assigned to  the  2 
  1134. lowest  color  values and the 7 highest values  (representing  DN 
  1135. values from 0 to 31 and from 144 to 255) would not be used  since 
  1136. the image contains no pixels with these values.
  1137.  
  1138.      By  using the "SET DNLO 32 DNHI 144" command the 16  display 
  1139. levels  available on the EGA display would be assigned to  values 
  1140. between 32 and 144 rather than distributed evenly from 0 to  255, 
  1141. and all 16 colors would be used in the display.
  1142.  
  1143.      HISTOGRAM takes the following keywords and arguments:
  1144.  
  1145.         SUBSAMPLE  n   a integral subsample  factor 
  1146.                        for speeding up histogram use of
  1147.                        "HISTOGRAM SUBSAMPLE 4" is always recommended
  1148.         NL n
  1149.         NS n           number of lines and samples from image
  1150.         SL n
  1151.         SS n           starting line and sample in image
  1152.  
  1153.      Two  special  keywords can be used with  Voyager  or  Viking 
  1154. images  on  the PDS CDROM disks.  These  will  extract  histogram 
  1155. values  stored  with the image on the CDROM disk and  reduce  the 
  1156. time required for the histogram to be generated from more than  1 
  1157. minute to about 3 seconds. Note that these commands will not work 
  1158. with Voyager image files in the \PLANET\JUPITER\ATMOS  directory, 
  1159. or with versions of system software written before April 1987.  
  1160.  
  1161.         VOY     use histogram from Voyager CDROM engineering data
  1162.         VIK     use histogram from Viking CDROM engineering data
  1163.  
  1164. 4.5.11 LABEL
  1165.  
  1166. The label command prints the labels for the currently selected
  1167. image file on the screen.  
  1168.  
  1169. 4.5.12 MENU
  1170.  
  1171. The menu command reads a file containing a list of file names and 
  1172. places the user in the MENU mode, where files from this list can be 
  1173. selected for display.  The MENU mode is similar to the FILE mode, 
  1174. except that the list of files presented is that provided in the menu 
  1175. file, rather than from a selected directory.
  1176.  
  1177. The MENU mode can be invoked by typing "MENU filename.MNU" at the 
  1178. COMMAND: prompt.  It can also be invoked on program startup by typing 
  1179. "IMDISP filename.MNU" to initiate the program.  The menu file must
  1180. use the ".MNU" extension to startup IMDISP in MENU mode.
  1181.  
  1182. Subcommands of the MENU mode are as follows:
  1183.  
  1184. # - Enter the number corresponding to a desired file name to select
  1185. the file.
  1186.  
  1187. P)revious  - display the previous screen of file names
  1188. N)ext      - display the next screen of file names
  1189. Q)uit      - quit or exit from MENU mode
  1190.  
  1191. After selecting and displaying an image, the user can return to the 
  1192. current menu by typing "MENU" at the COMMAND: prompt.
  1193.  
  1194. A menu file can take either of two formats.  The preferred format is a 
  1195. PDS labelled table file containing file names.  A sample file is shown
  1196. below:
  1197.  
  1198. NJPL1I00PDS100000000           = SFDU_LABEL
  1199. FILE_TYPE                      = TABLE
  1200. RECORD_FORMAT                  = STREAM
  1201. OBJECT                         = FILE_NAME
  1202.   TYPE                         = LITERAL
  1203.   LENGTH                       = 80
  1204. ENDOBJECT
  1205. NOTE                           = "Sample MENU file for IMDISP"
  1206. END
  1207. L:\OCEAN\SCBMEAN.IMG
  1208. L:\OCEAN\WCMEAN.IMG
  1209. L:\PLDS\TMCH01.DAT
  1210. L:\PLDS\DEM.DAT
  1211. L:\PLANET\SATURN\ATMOS\C3497355.IMG
  1212. <END OF FILE>
  1213.  
  1214. A second abbreviated form may also be used, where only the filenames 
  1215. are specified in the ".MNU" file.  In this case the file would only 
  1216. contain the filenames shown after the END statement in the example 
  1217. above.  
  1218.  
  1219. 4.5.13 PALETTE
  1220.  
  1221.      The PALETTE command is used for changing the colors assigned 
  1222. to  displayable  color  values.  This is  done  by  modifying  an 
  1223. internal  color  table which assigns intensity  values  for  red, 
  1224. green  and  blue to a color value, The EGA provides  4  intensity 
  1225. values  for each of 3 colors, so that 64 different colors can  be 
  1226. created. However, the EGA pixels are only 4-bits each so only  16 
  1227. color values can be used simultaneously.
  1228.  
  1229.      The palette can be modified using the EDIT command and saved 
  1230. and  loaded from a disk file. The edit mode is invoked by  typing 
  1231. PALETTE EDIT. With the EGA display, a bar containing 16 colors or 
  1232. shades  will  be displayed on the bottom of the screen.  A  small 
  1233. square  will appear in the middle of the center color  box.  This 
  1234. indicates  that  this  color  value  is  currently  selected  for 
  1235. editing.  To  select another color value for  editing,  move  the 
  1236. small square to the appropriate color using the "4" (left  arrow) 
  1237. and  "6" (right arrow) keys on the numeric keypad. The  color  of 
  1238. the current color box is changed with the "R", "G", and "B"  keys 
  1239. (for  red,  green,  and blue). Upper case  letters  increase  the 
  1240. amount  of  the primary color, and lower case keys  decrease  the 
  1241. amount of the color. The "8" (up arrow) and "2" (down arrow) keys 
  1242. increase  and decrease, respectively, the amount of  red,  green, 
  1243. and  blue simultaneously. Other commands in the palette edit mode 
  1244. are the  "s" command,  which  will  shift all colors one value to 
  1245. the right, and the  "x" command, which will exchange color values 
  1246. (the color setting for color  0 becomes the setting for color 15, 
  1247. while 15  replaces  0, the  color setting for color 1 becomes the 
  1248. setting  for 14,  while 14  replaces  1, etc.).  The  up and down 
  1249. arrow keys can also be used to cycle through the colors available 
  1250. in  a  given  display  mode  one  at a time.  Type the "." key or 
  1251. carriage return to exit the edit mode.
  1252.  
  1253.      PALETTE takes the following keywords and arguments:
  1254.  
  1255.         EDIT n           to interactively adjust an n-color palette. 
  1256.                          See edit description (above) for details
  1257.  
  1258.         PSEUDOCOLOR n    PS = 0 for default palette, 
  1259.                          PS = 1 for gray scale palette, 
  1260.                          PS = 2 for pseudo color palette
  1261.         SAVE filename    saves the specified palette on disk
  1262.         LOAD filename    loads the specified palette from disk
  1263.  
  1264.      The  default  palette file for LOAD or  SAVE  operations  is 
  1265. IMDISP.PAL.  The format of the default color palette when  stored 
  1266. in a palette file is as shown below:
  1267.  
  1268. NJPL1I00PDS000000784            = PDS_SFDU_LABEL
  1269. FILE_TYPE                       = TABLE
  1270. RECORD_TYPE                     = STREAM
  1271. FILE_RECORDS                    =  28
  1272. TABLE_ROWS                      =  16
  1273. ROW_COLUMNS                     =   4
  1274. COLUMN_NAME                     = (COLOR_NUMBER,
  1275.                                    RED_VALUE,
  1276.                                    GREEN_VALUE,
  1277.                                    BLUE_VALUE)
  1278. COLUMN_TYPE                     = (INTEGER,INTEGER,INTEGER,INTEGER)
  1279. END
  1280.    0   0   0   0
  1281.    1  64   0   0
  1282.    2 128   0   0
  1283.    3 192   0   0
  1284.    4 192  64   0
  1285.    5 192 128   0
  1286.    6 192 192   0
  1287.    7 128 192   0
  1288.    8   0 192   0
  1289.    9   0 192 128
  1290.   10   0 128 128
  1291.   11   0 128 192
  1292.   12   0   0 192
  1293.   13 128   0 192
  1294.   14 192   0 192
  1295.   15 192 192 192
  1296.  
  1297.      The  first  column of the palette table is the  color  value 
  1298. number  for  the display, and columns 2, 3 and  4  represent  the 
  1299. intensity  of  the  red, green and  blue  (respectively)  primary 
  1300. colors on a scale of 0 to 255. With the EGA display these  values 
  1301. are: 0 = off; 64 = low; 128 = medium; 192 = high.
  1302.  
  1303. 4.5.14 PROFILE
  1304.  
  1305.  
  1306.      PROFILE  plots the DN values of pixels located along a  line 
  1307. between  two points in the image, i.e. it creates a graph  of  DN 
  1308. value versus pixel along the line joining the two points,  Cursor 
  1309. mode is used to select the two endpoints; typing "." or  carriage 
  1310. return selects the current cursor position as the endpoint. After 
  1311. the endpoints are selected a line is drawn between the points and 
  1312. the graph is plotted at the bottom of the screen, showing the  DN 
  1313. values  on the x-axis and the positions along the line on the  y-
  1314. axis.
  1315.  
  1316. 4.5.15 QUIT
  1317.  
  1318.      Exits  the  program. The contents of the image  display  and 
  1319. refresh buffer are discarded.
  1320.  
  1321. 4.5.16 REFRESH
  1322.  
  1323.      REFRESH redisplays the image plane from the refresh  buffer. 
  1324. When  images are written to the screen they are also  written  to 
  1325. the  refresh buffer. The REFRESH command writes this buffer  back 
  1326. to  the screen, thereby erasing any graphics or  text  overlaying 
  1327. the  image  on the screen. The refresh buffer  contains  as  many 
  1328. lines  from  the display screen as there is room for  in  memory. 
  1329. REFRESH  takes,es  no parameters. It can also be used  after  the 
  1330. FILE prompt mode to redisplay the contents of the refresh buffer.
  1331.  
  1332.      Refresh is commonly used after the HELP command, or after  a 
  1333. HISTOGRAM  or PROFILE command to remove text and plots  from  the 
  1334. display screen.
  1335.  
  1336. 4.5.17 SAVE
  1337.  
  1338.      The  save  command  copies  the  REFRESH  buffer  (which  is 
  1339. normally an exact duplicate of the display screen) to a file.  On 
  1340. EGA systems the refresh buffer contains only 4 bits per pixel, so 
  1341. specifying BP = 8 will write the 4-bit pixels in full bytes,  but 
  1342. does not save full 8-bit pixels even if the input image is an  8-
  1343. bit  image,  Use  the COPIM utility program  to  produce  a  full 
  1344. resolution 16-bit subset of an 8-bit image.
  1345.  
  1346.      SAVE  takes the following arguments and keywords, where  the 
  1347. filename must immediately follow the SAVE command:
  1348.  
  1349.         filename                    filename of image to save
  1350.  
  1351.         NL n
  1352.         NS n                        number of lines and samples to save
  1353.  
  1354.         SL n
  1355.         SS n                        starting line and sample to save
  1356.         BP n                        number of bits per pixel in output image
  1357.  
  1358.      Example: Save a 200 line by 200 sample area at the center of 
  1359. an  image  in the file SMALL.IMG. First use the FILE  command  to 
  1360. select and display an input image. Now type:
  1361.  
  1362.      "SAVE SMALL.IMG SL 100 SS 210 NL 200 NS 200" 
  1363.  
  1364. to save the portion of the image beginning at line 100 and sample 
  1365. 210 in the new file SMALL.IMG.
  1366.  
  1367. 4.5.18 SET
  1368.  
  1369.      SET is used to display and change the DN (pixel value) range 
  1370. that  is  used  to  compress  the  pixel  values  to  the   range 
  1371. appropriate  for the display device. The default, which is  reset 
  1372. for  each  new  file,  is the full range of  DN  values  for  the 
  1373. particular pixel format (e.g. 0 to 255 for byte).
  1374.  
  1375.      The results of a SET command will not take effect until  the 
  1376. next DISPLAY command is performed.
  1377.  
  1378.      Set takes the following keywords:
  1379.  
  1380.         DNLOW n
  1381.         DNHIGH n   where values less than DNlow are set to  color 
  1382.                    value 0, values greater than DNHIGH are set to 
  1383.                    the  maximum  color value available,  and  the 
  1384.                    color  values between are assigned equally  to 
  1385.                    the DN values between Dnlow and DNhi.
  1386.  
  1387.      For  example,  using the default color palette  and  an  EGA 
  1388. display with 16 color values available, the command "SET DNLO 100 
  1389. DNHI 164" will assign DN values below 100 to black and DN  values 
  1390. above 164 to white, and spread the 16 color values between the DN 
  1391. limits, thus each color value will represent 4 DNs (value 0 =  DN 
  1392. 100 to 103; value 1 - DN 104 to 107, etc.).
  1393.  
  1394.      If  values other than the default are used then  the  images 
  1395. will display more slowly because scaling divisions are  required. 
  1396. SET with no parameters will display the current values.
  1397.  
  1398.      The  DNLO  and  DNHI values are reset  to  the  minimum  and 
  1399. maximum for a given pixel size when a FILE command is issued.
  1400.  
  1401. 4.5.19 STRETCH
  1402.  
  1403.  
  1404.      STRETCH  sets the palette to a gray scale stretched  between 
  1405. the two specified pixel values. Stretch is most useful on the PGA 
  1406. display  where 16 gray levels are available. On the  EGA  display 
  1407. the  stretch  command  activates the  gray  level  palette  which 
  1408. provides  only 4 gray levels. Use the PAL PS 0 command to  return 
  1409. the display to the default palette after performing a stretch.
  1410.  
  1411.      STRETCH takes the following keywords :
  1412.  
  1413.         LOW n
  1414.         HIGh n     the low and high DN values  of the stretch.   
  1415.                    
  1416.  
  1417.      These  pixel  values refer to the DN values in  the  current 
  1418. image display, not necessarily in the original image (scaling may 
  1419. have  been involved).   For example with the EGA display  the  DN 
  1420. values in the display range from 0 to 15, even if a byte image is 
  1421. being displayed.
  1422.  
  1423.      The STRETCH command is not recommended for use on EGA systems.
  1424.  
  1425. 4.5.20 SYSTEM
  1426.  
  1427.      The SYSTEM command is used to send a command to MSDOS.
  1428.  
  1429.  
  1430.      For  example "SYS L:" will set the L: drive as  the  current 
  1431. default  drive. If there is not enough memory available  for  the 
  1432. system command to be executed an error message is displayed.  The 
  1433. SYS  command will not work on floppy disk systems unless the  file 
  1434. "COMMAND.COM"  is  present  on the floppy disk  with  the  IMDISP 
  1435. program.
  1436.  
  1437. 4.5.21 TEXT
  1438.  
  1439. The text command can be used to display a string of text on the 
  1440. screen.  The text string can be entered on the command line, enclosed 
  1441. in apostraphies or quotes (e. g., TEXT `This is a text string').  
  1442. If the text string is not entered on the command line the program will 
  1443. prompt for the string to be displayed.  
  1444.  
  1445. Once the command is issued and the text string entered the program is 
  1446. placed in CURSOR mode so that the display position can be selected.  
  1447. This is done by using the arrow keys to move the cursor to the desired 
  1448. location.  After the position is selected, the user types a period (.) 
  1449. or carriage return and the text will be written on the display screen.
  1450.  
  1451. The text command writes over image data in the display and refresh 
  1452. buffer, thus the underlying portion of the image is lost.
  1453.  
  1454. 4.5.22 TYPE
  1455.  
  1456.  
  1457.      The TYPE command is used to type the contents of a text file 
  1458. on the display screen, using the standard MSDOS type command.
  1459.  
  1460.      Its argument is passed to MSDOS for execution. At the end of 
  1461. the type operation the screen will display "Type carriage  return 
  1462. to  continue:" which will return to the IMDISP command  mode.  If 
  1463. there is not enough memory available for the system command to be 
  1464. executed an error message is displayed.
  1465.  
  1466. 4.6 OTHER UTILITY PROGRAMS
  1467.  
  1468.      There  are  several utility programs also  provided  on  the 
  1469. distribution  disk. These programs can read PDS  labeled,  VICAR2 
  1470. labeled,  or  unlabeled  images. The output  images  are  always 
  1471. written  with  PDS  ODL  labels.  The  programs  prompt  for  the 
  1472. necessary input values.
  1473.  
  1474. 4.6.1 COPIM
  1475.  
  1476.      COPIM  is a simple image copying program. It' can  copy  the 
  1477. whole  image, for example to put PDS labels on a foreign  image), 
  1478. or  extract a window from the image. It can subsample  the  image 
  1479. with an integral subsampling factor. The program prompts for  the 
  1480. input  and  output file names, the window to extract  (just  type 
  1481. return  for  the whole image), and the  subsampling  factor  (the 
  1482. default  is 1). If the input file is not in VICAR2 or  PDS  image 
  1483. format  the program will also prompt for the number of lines  and 
  1484. samples, pixel size and header size of the image.
  1485.  
  1486.      For example, to extract the first 100 lines and samples from 
  1487. the file LOGO.IMG the following commands would be used:
  1488.  
  1489.      COPIM 
  1490.      Input Image: LOGO.IMG
  1491.      Lines: 350 Samples: 340 Bits per pixel: 1 
  1492.      Output Image: LOGOSUB.IMG
  1493.      Starting line and sample, number of lines and samples: 1 1 100 100 
  1494.      Line Subsampling factor (1): 1
  1495.      Sample Subsampling factor(1): 1
  1496.  
  1497.  
  1498. 4.6.2 CONVERT
  1499.  
  1500.      CONVERT  is  simple  pixel  format  conversion  program.  It 
  1501. converts an image to an integer (16 bits), byte (8 bits),  nibble 
  1502. (4  bits),  or binary (1 bit) image. It can also perform  a  user 
  1503. specified  scaring. The program prompts for the input and  output 
  1504. file  names, the output format (must be 1,4,8, or 16  bits),  and 
  1505. the  input and output numerical ranges for scaling.  The  default 
  1506. scaling values are appropriate for the data types being used.
  1507.  
  1508.      For  example, to convert MONTAGE.IMG to an 8-bit  per  pixel 
  1509. image and scale the output pixels evenly between the values of  0 
  1510. and 127 the following commands would be used:
  1511.  
  1512.      CONVERT 
  1513.      Input Image: MONTAGE.IMG
  1514.      Lines : 350       Samples : 640 Bits per pixel : 4 
  1515.      Output Image: MONTBIG.IMG
  1516.      Output bits per pixel (1, 4, 8, 16) : 8 
  1517.      Input DN range (O 15) :
  1518.      Output DN range (O 255) : 0 127
  1519.  
  1520. 4.6.3 CLEANUP
  1521.  
  1522.      The  CLEANUP and CLEANUP2 programs are available  separately 
  1523. with  a  user's guide, executables and required data  files.  The 
  1524. purpose  of these programs is to clean up "noisy" Voyager  images 
  1525. by  removing the dark current. The dark current image  represents 
  1526. the ambient noise in the camera system; therefore, removing  this 
  1527. noise "cleans up" the original image, making it appear crisper on 
  1528. the monitor.
  1529.  
  1530.  
  1531.                            Chapter 5
  1532.  
  1533.  
  1534.                         COMMAND SUMMARY
  1535.  
  1536.  
  1537.      Within this command summary listing, brackets ([])  indicate 
  1538. optional  parameters or keywords. Filename is the name of a  file 
  1539. in the current directory or a fully qualified filename which  can 
  1540. include  drive  letter and pathname. Directory name is  an  MSDOS 
  1541. directory   path   specification,  a  valid  directory   mask   a 
  1542. specification  containing wild card characters (*, ?)  per  MSDOS 
  1543. rules  for wildcard use in the DIRECTORY command. The symbol  "n" 
  1544. is used to indicate an integer value.
  1545.  
  1546.     BATCH        [filenamel
  1547.     CD           [directory name]  [..]
  1548.     CHDIR        [directory name]  [..]
  1549.     CURSOR
  1550.     DIRECTORY    [directory mask]  [/w]
  1551.     DISPLAY      [SUB n] [SL n] [SS n]  [NL n] [NS n]  [BP n] 
  1552.                  [CENT] [DSL n] [DSS n]
  1553.     ERASE
  1554.     EXIT
  1555.     FILE         [filename] ["CD:mm:ss:bb"I
  1556.     HELP         [command name]
  1557.     HISTOGRAM    [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n]
  1558.     LABEL
  1559.     MENU         [filename]
  1560.     PALETTE      [EDIT n] [PS n]  [LOAD filename] [SAVE filename]
  1561.     PROFILE
  1562.     QUIT
  1563.     REFRESH
  1564.     SAVE         filename [SL n] [SS n] [NL n] [NS n] [BP n]
  1565.     SET          [DNLO n] [DNHI n]
  1566.     STRETCH      [LO n] [HI n]
  1567.     SYSTEM       [MSDOS command]
  1568.     TEXT         "text" or 'text'
  1569.     TYPE         filename
  1570.  
  1571.